pub mod tab;

use tab::{ TabData };

pub mod down_html {
    pub fn browse_liv() -> Result<(), failure::Error> {

        use headless_chrome::{Browser, LaunchOptions, browser::{default_executable}};

        let path = default_executable();

        println!("path: {:#?}", path);

        println!("lunch browser default pattern");

        let _browser = Browser::default()?;

        println!("init table page");

        // let table = _browser.wait_for_initial_tab()?;

        // println!("start go to baidu");
        // table.navigate_to("https://www.baidu.com/")?;

        // table.wait_until_navigated()?;
        // let title = table.get_title()?;

        // println!("title get: {}", title);

        // match table.wait_for_element("html head title") {
        //     Err(e) => eprintln!("Query failed: {:?}", e),
        //     Ok(e) => {
        //         let des = e.get_description()?;
        //         println!("{:#?}", des);
        //     },
        // }

        Ok(())
    }
}

pub mod parse_html {

}